﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Orchard.ContentManagement.MetaData;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;
using TissotWeb.GoogleMaps.Models;

namespace TissotWeb.GoogleMaps
{
    public class MapMigration : DataMigrationImpl
    {
        public int Create()
        {
            ContentDefinitionManager.AlterPartDefinition(
                   typeof(GoogleMapPart).Name, cfg => cfg.Attachable()
                   .WithDescription("Adds the ability to attach a google map to any content types."));

            return 2;
        }

        public int UpdateFrom1() {
ContentDefinitionManager.AlterPartDefinition(
                typeof(GoogleMapPart).Name, cfg => cfg.Attachable()
                .WithDescription("Adds the ability to attach a google map to any content types."));
            return 2;
        }
    }
}